		<!-- ui-dialog -->
		<div id="dialog" title="Thêm mới"></div>
        <div id="dialog2" title="Thêm mới"></div>
        <!-- ui-dialog -->
		<!--<div class="paddingl5" style="position : relative; width:100%;">
        	<div id="boxsearch mtop10" class="fleft w100pt">
            	<div class="fleft paddingt1">
                	<input placeholder="Tên <?=$title;?>..." id="fullname" class="input search h18" />
                </div>
				<div class="fleft mleft5"><?=$groupss;?></div>
				<div id="search" class="btn fleft mleft5"><span class="fleft icon icon-search"></span><span class="fleft">Tìm kiến</span></div>
                <div id="adds" class="btn fleft mleft5"><span class="fleft icon icon-add"></span><span class="fleft">Thêm mới</span></div>
                <div id="delete" class="btn fleft mleft5"><span class="fleft icon icon-delete"></span><span class="fleft">Xoá</span></div>
            </div>
            <div id="gridview" class="fleft w100pt" >
				<table class="resultset" id="grid"></table>
            </div>
			<div class="fleft" id="paging"></div>
            <div class="clear"></div>
		</div>-->
        <div class="paddingl5" style="position : relative; width:100%;">
        	<div class="boxinsert">
            	 <!--Row-->
                 <div class="rows">
                 	 <div class="fleft mleft5">
                     	  <input autocomplete="off" type="hidden" id="id" />
                          <input id="fullname" class="insert input w220" placeholder="Họ tên..." />
                     </div>
                     <div class="fleft mleft30">
                          
                     </div>
                     <div class="fright mright5">
                         	<div id="message" class="mleft5 fleft" style="margin-top:5px !important;"></div>
                            
                            <?php if(isset($rights['delete'])){?>
                  	<div id="delete" class="btn fright mleft5 mright5"><span class="fleft icon icon-delete"></span><span class="fleft">Xoá</span></div>
                    <?php }?>
                    <div id="refresh" class="btn fright mleft5"><span class="fleft icon icon-refresh"></span><span class="fleft">Làm mới</span></div>
                    <?php if(isset($rights['edit'])){?>
                   
                    <div id="edit" class="btn fright mleft5"><span class="fleft icon icon-edits"></span><span class="fleft">Sữa</span></div>
                      <?php }?>
					 <?php if(isset($rights['insert'])){?>
                    <div id="adds" class="btn fright mleft5"><span class="fleft icon icon-add"></span><span class="fleft">Thêm mới</span></div>
                    <?php }?>
                    <div id="search" class="btn fright mleft5 "><span class="fleft icon icon-search"></span><span class="fleft">Tìm kiến</span></div>
                 </div><!--E Row-->
                 <div class="clear"></div>
            </div>
            <div id="gridview" class="fleft w100pt" >
				<table class="resultset" id="grid"></table>
            </div>
            <div class="fleft" id="paging"></div>
            <div class="clear"></div>
		</div>
        
        
        
		<link rel="stylesheet" type="text/css" href="<?=url_tmpl()?>template.css" />
        <link rel="stylesheet" type="text/css" href="<?=url_tmpl()?>fix/css/base.css" />
		<script type="text/javascript" src="<?=url_tmpl()?>fix/highlighter/codehighlighter.js"></script>	
		<script type="text/javascript" src="<?=url_tmpl()?>fix/highlighter/javascript.js"></script>			
		<script type="text/javascript" src="<?=url_tmpl()?>fix/javascript/jquery.fixheadertable.min.js"></script>		
		<script src="<?=url_tmpl()?>selectall/jquery.multiple.select.js" type="text/javascript"></script>
		<link href="<?=url_tmpl()?>selectall/multiple-select.css" rel="stylesheet"/>
		<script type="text/javascript">  
			var url = '<?=base_url()?>';
			var control = '<?=$cotrol;?>';		
			var title = '<?=$title;?>';
			$(function() {$('\x23\x73\x64\x65\x70\x61\x74\x6D\x65\x6E\x74').multipleSelect({filter: true,placeholder:'\x43\x68ọ\x6E \x70\x68\xF2\x6E\x67 \x62\x61\x6E...',selectAllText:'\x43\x68ọ\x6E \x70\x68\xF2\x6E\x67 \x62\x61\x6E...'});$('\x23\x73\x67\x72\x6F\x75\x70\x73').multipleSelect({filter: true,placeholder:'\x43\x68ọ\x6E \x6E\x68\xF3\x6D \x71\x75\x79ề\x6E...',selectAllText:'\x43\x68ọ\x6E \x6E\x68\xF3\x6D \x71\x75\x79ề\x6E...'});$('\x23\x73\x67\x72\x6F\x75\x70\x73,\x23\x73\x64\x65\x70\x61\x74\x6D\x65\x6E\x74').multipleSelect('\x75\x6E\x63\x68\x65\x63\x6B\x41\x6C\x6C');$('\x23\x61\x64\x64\x73').click(function(){$.post(url+control+'/\x69\x6E\x73\x65\x72\x74',{},function(data){$("#dialog").html(data);});dialogs('\x54\x68\xEA\x6D \x6Dớ\x69 '+title,380,350,'\x61\x64\x64');$('\x23\x64\x69\x61\x6C\x6F\x67').dialog('\x6F\x70\x65\x6E');$(".ui-dialog-buttonset").prepend('<\x64\x69\x76 \x69\x64="\x6D\x65\x73\x73\x61\x67\x65" \x63\x6C\x61\x73\x73="\x66\x6C\x65\x66\x74"></\x64\x69\x76>');$(".fullnames").focus();return false;});$('\x23\x73\x65\x61\x72\x63\x68').click(function(){var groups = $('\x23\x73\x67\x72\x6F\x75\x70\x73').multipleSelect('\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x73');if(groups == "''"){groups = '';}var depatment = $('\x23\x73\x64\x65\x70\x61\x74\x6D\x65\x6E\x74').multipleSelect('\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x73');if(depatment == "''"){depatment = '';}var end = ',"\x67\x72\x6F\x75\x70\x73":"'+groups+'",'  +'"\x64\x65\x70\x61\x74\x6D\x65\x6E\x74":"'+depatment+'"';var str_json = jsonSearch(end);getList(str_json,0);});$("#delete").click(function(){cdialog('\x64\x69\x61\x6C\x6F\x67',url,control);$('\x23\x64\x69\x61\x6C\x6F\x67').html('<\x62\x72>\x42ạ\x6E \x63\xF3 \x63\x68ắ\x63 \x63\x68ắ\x6E x\x6F\xE1 \x6B\x68\xF4\x6E\x67?');$('\x23\x64\x69\x61\x6C\x6F\x67').dialog('\x6F\x70\x65\x6E');return false;});getList();$( "#fullname" ).keyup(function(){var availableTags;var key = $(this).val();$.post(url+control+'/\x6C\x6F\x61\x64\x53\x65\x61\x72\x63\x68',{key:key},function(data){data = data.split(",");availableTags = data;$( "#fullname" ).autocomplete({source: availableTags});});});});function func_get(){$('.\x65\x64\x69\x74').each(function(e){$(this).click(function(){dialogs('\x53ử\x61 '+title,380,350,'\x65\x64\x69\x74');var id = $(this).attr('\x69\x64');$.post(url+control+'/\x69\x6E\x73\x65\x72\x74',{id:id},function(data){$("#dialog").html(data);});$('\x23\x64\x69\x61\x6C\x6F\x67').dialog('\x6F\x70\x65\x6E');$(".ui-dialog-buttonset").prepend('<\x64\x69\x76 \x69\x64="\x6D\x65\x73\x73\x61\x67\x65" \x63\x6C\x61\x73\x73="\x66\x6C\x65\x66\x74"></\x64\x69\x76>');return false;});});$('.\x64\x65\x6C\x65\x74\x65').each(function(e){$(this).click(function(){var id = $(this).attr('\x69\x64');cdialog('\x64\x69\x61\x6C\x6F\x67',url,control,id);$('\x23\x64\x69\x61\x6C\x6F\x67').html('<\x62\x72>\x42ạ\x6E \x63\xF3 \x63\x68ắ\x63 \x63\x68ắ\x6E x\x6F\xE1 \x6B\x68\xF4\x6E\x67?');$('\x23\x64\x69\x61\x6C\x6F\x67').dialog('\x6F\x70\x65\x6E');return false;});});checkall();}function getList(str_json,page){$('\x23\x67\x72\x69\x64\x76\x69\x65\x77').html('<\x74\x61\x62\x6C\x65 \x63\x6C\x61\x73\x73="\x72\x65\x73\x75\x6C\x74\x73\x65\x74" \x69\x64="\x67\x72\x69\x64"></\x74\x61\x62\x6C\x65>');var height = 320;$.ajax({url: url+control+'/\x67\x65\x74\x4C\x69\x73\x74',type: '\x50\x4F\x53\x54',data: {search:str_json,page:page},success: function(data) {var obj = $.evalJSON(data);$("#paging").html(obj.paging);$('\x23\x67\x72\x69\x64').html(obj.content).fixheadertable({colratio : [40,40,150,120,150,180,90,70,130,70],height : height,width : '\x61\x75\x74\x6F',zebra : true,sortedColId : 0,resizeCol : true,pager : false,rowsPerPage	 : 10});paging(getList,page);if(typeof(func_get)=='\x66\x75\x6E\x63\x74\x69\x6F\x6E'){func_get(data);}}});}function dialogs(titles,w,h,type){$('\x23\x64\x69\x61\x6C\x6F\x67').dialog({autoOpen: false,width: w,height:h,modal: true,title: titles,position: '\x63\x65\x6E\x74\x65\x72',buttons: {'\x4Cư\x75': function() {$("#message").html('');var fullnames = $(".fullnames").val();if(fullnames==''){$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x65\x72\x72\x6D\x73\x67">\x48ọ \x74\xEA\x6E \x6B\x68\xF4\x6E\x67 đượ\x63 \x74\x72ố\x6E\x67.</\x73\x70\x61\x6E>');$(".fullnames").focus();return false;}if($("#username").val()==''){$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x65\x72\x72\x6D\x73\x67">\x54\xE0\x69 \x6B\x68\x6Fả\x6E \x6B\x68\xF4\x6E\x67 đượ\x63 \x74\x72ố\x6E\x67.</\x73\x70\x61\x6E>');$("#username").focus();return false;}var str = "";var name, val;$(".insert").each(function(){name = $(this).attr('\x69\x64');val = $(this).val();str+=',"'+name+'":"'+val+'"';});var str = "{" + str.substring(1) + "}";var id = $("#id").val();var sex = $('\x69\x6E\x70\x75\x74[\x6E\x61\x6D\x65=\x73\x65x]:\x63\x68\x65\x63\x6B\x65\x64').val();var password = $('\x23\x70\x61\x73\x73\x77\x6F\x72\x64').val();$.post(url+control+'/\x73\x61\x76\x65',{str:str,id:id,sex:sex,password:password},function(data){if(data == 2){$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x65\x72\x72\x6D\x73\x67">\x54\xE0\x69 \x6B\x68\x6Fả\x6E đ\xE3 \x74ồ\x6E \x74ạ\x69.</\x73\x70\x61\x6E>');$("#username").focus();return false;}else if(data == 0){if(id == ""){$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x65\x72\x72\x6D\x73\x67">\x54\x68\xEA\x6D \x6Dớ\x69 \x74\x68ấ\x74 \x62ạ\x69.</\x73\x70\x61\x6E>');$("#username").focus();return false;}else{$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x65\x72\x72\x6D\x73\x67">\x43\x68ỉ\x6E\x68 \x73ử\x61 \x74\x68ấ\x74 \x62ạ\x69.</\x73\x70\x61\x6E>');$("#username").focus();return false;}}else{if(id == ""){$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x6F\x6B\x6D\x73\x67">\x54\x68\xEA\x6D \x6Dớ\x69 \x74\x68\xE0\x6E\x68 \x63\xF4\x6E\x67.</\x73\x70\x61\x6E>');getList();return false;}else{$("#message").html('<\x73\x70\x61\x6E \x63\x6C\x61\x73\x73="\x6F\x6B\x6D\x73\x67">\x43\x68ỉ\x6E\x68 \x73ử\x61 \x74\x68\xE0\x6E\x68 \x63\xF4\x6E\x67.</\x73\x70\x61\x6E>');getList();return false;}}});return false;},"Huỷ": function() {$(this).dialog("close");}}});}
		</script>	
		<style type="text/css">

		</style>